﻿using Codemo.Core.Applications;

namespace Codemo.Core.Deployment.Tasks
{
    /// <summary>
    /// 
    /// </summary>
    public abstract class DeploymentTask
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="DeploymentTask"/> class.
        /// </summary>
        /// <param name="application">The application.</param>
        /// <param name="deploymentConfigurationVersion">The deployment configuration version.</param>
        /// <param name="deploymentTarget">The deployment target.</param>
        /// <param name="package">The package.</param>
        protected DeploymentTask(Application application, DeploymentConfigurationVersion deploymentConfigurationVersion,
                                 DeploymentTarget deploymentTarget, Package package)
        {
            Application = application;
            DeploymentConfigurationVersion = deploymentConfigurationVersion;
            DeploymentTarget = deploymentTarget;
            Package = package;
        }

        /// <summary>
        /// Gets or sets the application.
        /// </summary>
        /// <value>The application.</value>
        public Application Application { get; set; }

        /// <summary>
        /// Gets or sets the application version.
        /// </summary>
        /// <value>The application version.</value>
        public DeploymentConfigurationVersion DeploymentConfigurationVersion { get; set; }

        /// <summary>
        /// Gets or sets the deployment target.
        /// </summary>
        /// <value>The deployment target.</value>
        public DeploymentTarget DeploymentTarget { get; set; }

        /// <summary>
        /// Gets or sets the package.
        /// </summary>
        /// <value>The package.</value>
        public Package Package { get; set; }

        /// <summary>
        /// Executes this instance.
        /// </summary>
        public abstract void Execute();
    }
}